﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ViewModels="clr-namespace:Shattered_Windows.ViewModels"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="Shattered_Windows.MainWindow"
        Title="Shattered Windows" Height="352" Width="525" Background="LightGray" x:Name="mainWindow" ResizeMode="CanMinimize">
    <Window.Resources>
        <ViewModels:MainPageViewModel x:Key="ViewModel" />
        <DataTemplate x:Key="fixTemplate">
        	<StackPanel>
        		<TextBlock Text="{Binding XPath=@id}"/>
        		<TextBlock Text="{Binding XPath=Name}"/>
        	</StackPanel>
        </DataTemplate>
        <DataTemplate x:Key="fixTemplate1">
        	<StackPanel>
        		<TextBlock Text="{Binding XPath=@id}"/>
        	</StackPanel>
        </DataTemplate>
        <DataTemplate x:Key="fixTemplate2">
        	<StackPanel>
        		<TextBlock Text="{Binding XPath=name}"/>
        	</StackPanel>
        </DataTemplate>
        <DataTemplate x:Key="fixTemplate3">
        	<StackPanel>
        		<TextBlock Text="{Binding XPath=desc}"/>
        	</StackPanel>
        </DataTemplate>
    </Window.Resources>
    <Grid DataContext="{StaticResource ViewModel}">
    	<VisualStateManager.VisualStateGroups>
    		<VisualStateGroup x:Name="VisualStateGroup"/>
    	</VisualStateManager.VisualStateGroups>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="266"/>
            <ColumnDefinition Width="499" />
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <TextBox Height="20" HorizontalAlignment="Left" Margin="0,288,0,0" x:Name="textStatus" VerticalAlignment="Top" Width="522" Background="LightGray" Grid.ColumnSpan="2" />
        <ProgressBar Height="18" HorizontalAlignment="Right" Margin="0,289,265,0" x:Name="statusBar" VerticalAlignment="Top" Width="100" Grid.Column="1" />
        <TabControl Height="263" HorizontalAlignment="Left" x:Name="mainTabControl" VerticalAlignment="Top" Width="500" Grid.ColumnSpan="2" Background="LightGray">
            <TabItem Header="Main" x:Name="mainTab" ToolTip="Returns you to the main screen of the utility.">
                <Grid>
                    <Button Content="Run All Fixes" Height="23" HorizontalAlignment="Left" Margin="-5,204,0,0" x:Name="runAll" VerticalAlignment="Top" Width="250" />
                    <Button Content="Restrictive Policy Scanner..." Height="23" HorizontalAlignment="Right" Margin="0,204,-5,0" x:Name="policyScan" VerticalAlignment="Top" Width="250" />
                    <TextBox Height="187" HorizontalAlignment="Left" Margin="247,11,0,0" x:Name="mainDesc" VerticalAlignment="Top" Width="225" Text="Blah blah blah disclaimer blah blah blah supported os ect ect" TextWrapping="Wrap" Background="LightGray" />
                    <TextBlock Height="25" HorizontalAlignment="Left" Margin="9,38,0,0" x:Name="trashLogo" Text="Insert Logo Here" VerticalAlignment="Top" Width="232" TextAlignment="Center" />
                    <TextBlock Height="23" HorizontalAlignment="Left" Margin="102,62,0,0" x:Name="textVersion" Text="Version #" VerticalAlignment="Top" />
                </Grid>
            </TabItem>
            <TabItem Header="PostOp" x:Name="postOp" ToolTip="Contains Temp Cleaner, Adjust Time/Date, and Sync Time.">
                <Grid>
                    <CheckBox IsChecked="{Binding DeleteTemporaryInternetFiles, Mode=TwoWay}" Content="Delete Temporary Internet Files" Height="16" HorizontalAlignment="Left" Margin="18,13,0,0" x:Name="checkTemp" VerticalAlignment="Top" />
                    <CheckBox IsChecked="{Binding SetDateTime, Mode=TwoWay}" Content="Set Date and Time" Height="16" HorizontalAlignment="Left" Margin="18,33,0,0" x:Name="checkTime" VerticalAlignment="Top" />
                    <CheckBox Content="Check All" Height="16" HorizontalAlignment="Left" Margin="0,215,0,0" x:Name="checkPostOp" VerticalAlignment="Top" Checked="checkPostOp_Checked" Unchecked="checkPostOp_Unchecked" />
                </Grid>
            </TabItem>
            <TabItem Header="Installer" x:Name="installer" ToolTip="Contains fixes for Windows Installer.">
                <Grid>
                    <CheckBox Content="Fix Windows Installer" Height="16" HorizontalAlignment="Left" Margin="18,13,0,0" x:Name="checkInstaller" VerticalAlignment="Top" />
                </Grid>
            </TabItem>
            <TabItem Header="WU/WUAU" x:Name="update" ToolTip="Contains fixes for Windows Update and Automatic Updates.">
                <Grid>
                    <CheckBox Content="Fix Windows Update" Height="16" HorizontalAlignment="Left" Margin="18,13,0,0" x:Name="checkWUpdate" VerticalAlignment="Top" />
                </Grid>
            </TabItem>
            <TabItem Header="Crypto" x:Name="crypt" ToolTip="Contains fixes for SSL, HTTPS, and Cryptsvc.">
                <Grid>
                    <CheckBox Content="Fix SSL/HTTPS/Cryptsvc" Height="16" HorizontalAlignment="Left" Margin="18,13,0,0" x:Name="checkCypto" VerticalAlignment="Top" />
                </Grid>
            </TabItem>
            <TabItem Header="Registration Center" x:Name="regCenter" ToolTip="Contains fixes for Registration Center.">
                <Grid>
                    <CheckBox Content="ActiveX Controls/Codecs" Height="16" HorizontalAlignment="Left" Margin="18,13,0,0" x:Name="checkActiveX" VerticalAlignment="Top" />
                    <CheckBox Content="Control Panel Applets" Height="16" HorizontalAlignment="Left" Margin="18,33,0,0" x:Name="CheckApplets" VerticalAlignment="Top" />
                    <CheckBox Content="Direct [X|Draw|Show|Media]" Height="16" HorizontalAlignment="Left" Margin="18,53,0,0" x:Name="checkDirectX" VerticalAlignment="Top" />
                    <CheckBox Content="Programming Cores/Runtimes" Height="16" HorizontalAlignment="Left" Margin="18,73,0,0" x:Name="checkRuntimes" VerticalAlignment="Top" />
                    <CheckBox Content="Explorer/IE/OE/CMD/WMP" Height="16" HorizontalAlignment="Left" Margin="18,93,0,0" x:Name="checkExplorer" VerticalAlignment="Top" />
                    <CheckBox Content="Object Linking Libraries (OLE)" Height="16" HorizontalAlignment="Left" Margin="18,113,0,0" x:Name="checkOLE" VerticalAlignment="Top" />
                    <CheckBox Content="Check All" Height="16" HorizontalAlignment="Left" Margin="0,215,0,0" x:Name="checkRegCenter" VerticalAlignment="Top" />
                </Grid>
            </TabItem>
            <TabItem Header="Utilities" x:Name="utlities" ToolTip="Contains tools to reinstall critical windows componenets, SFC, etc.">
                <Grid>
                    <ListBox Height="232" HorizontalAlignment="Left" Margin="-1,0,0,0" x:Name="listUtilities" VerticalAlignment="Top" Width="241" ItemsSource="{Binding XPath=/utilties/Windows_XP/x86/fix}" ItemTemplate="{DynamicResource fixTemplate2}" />
                    <TextBox Height="231" HorizontalAlignment="Left" Margin="240,0,0,0" x:Name="textUtilities" VerticalAlignment="Top" Width="240" Background="LightGray" IsEnabled="True" IsReadOnly="True" />
                </Grid>
            </TabItem>
            <TabItem Header="About" x:Name="about">
                <Grid>
                    <TextBlock Height="20" HorizontalAlignment="Left" Margin="26,98,0,0" x:Name="textAbout" Text="Developed by blah blah blah contact blah blah blah license blah blah blah etc etc" VerticalAlignment="Top" Width="434" />
                </Grid>
            </TabItem>
        </TabControl>
        <Button Content="Run Selected Items" Height="23" HorizontalAlignment="Left" Margin="0,264,0,0" x:Name="buttonRunSelected" VerticalAlignment="Top" Width="500" Grid.ColumnSpan="2" Click="buttonRunSelected_Click" />
    </Grid>
    
</Window>
